package com.fanshe;

public class Person {

    private String name;

    public int age;


    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void show() {
        System.out.println("你好，我是一个人");
    }

    public void demo(int sex) {
        if(sex == 1) {
            System.out.println("性别为女");
        } else {
            System.out.println("性别为男");
        }

    }


    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
